package com.flyduck.vueshop.product.h5.controller;

import com.flyduck.vueshop.common.core.lang.Result;
import com.flyduck.vueshop.common.mybatis.base.BaseController;
import com.flyduck.vueshop.product.h5.service.H5CategoryService;
import com.flyduck.vueshop.product.h5.vo.H5CategoryDetailsRespVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program: vueshop
 * @description:
 * @author: flyduck
 * @create: 2024-05-18 21:42
 **/
@RestController
@RequestMapping("/product/h5/category")
public class H5CategoryController extends BaseController {

    @Resource
    private H5CategoryService h5CategoryService;

    @GetMapping("/getCategoryDetailsById/{id}")
    public Result<H5CategoryDetailsRespVO> getCategoryDetailsById(@PathVariable("id") Long id){
        H5CategoryDetailsRespVO h5CategoryDetailsRespVO = h5CategoryService.getCategoryDetailsById(id);
        return Result.success(h5CategoryDetailsRespVO);
    }
}
